//package lib.bone.admin.controller.fix;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lib.bone.access.config.cycle.NepuCycle;
//import lib.bone.access.config.cycle.NepuCycleService;
//import lib.bone.common.core.domain.ResponseDTO;
//import lib.bone.flow.domain.entity.FlowWork;
//import lib.bone.flow.service.FlowWorkService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@RestController
//@RequestMapping("flowWork/fix")
//@Slf4j
//@Api(tags = "流程记录修复")
//public class FlowWorkFixController {
//
//    @Autowired
//    FlowWorkService flowWorkService;
//
//    @Autowired
//    NepuCycleService cycleService;
//
//    @PostMapping("service")
//    @ApiOperation(value = "修复FlowWork字段内容",notes = "")
//    public ResponseDTO<Object> fixWorkService() {
//        List<FlowWork> flowWorks = flowWorkService.getAllFlowWork();
//        flowWorks.forEach(work -> {
//            flowWorkService.buildService(work);
//        });
//        return ResponseDTO.succMsg("成功执行");
//    }
//
//
//    @PostMapping("cycle")
//    @ApiOperation(value = "修复FlowWork周期字段内容",notes = "接口使用前请修改配置")
//    public ResponseDTO<Object> fixWorkCycle(){
//        NepuCycle cycle = cycleService.getNowResearchCycle();
//        List<FlowWork> flowWorks = flowWorkService.getAllFlowWork();
//        flowWorks.forEach(work -> {
//            flowWorkService.buildCycle(work,cycle.getId(),cycle.getCycleName());
//        });
//        return ResponseDTO.succMsg("成功执行");
//    }
//
//
//
//}
